# 账单备份
# with open("bill.text", 'r', encoding="utf-8") as f:
#     f1 = open("bill.text.bak", 'w', encoding='utf-8')
#     for lien in f:
#         my_list = lien.strip()
#         if my_list.split(",")[4] == '测试':
#             continue
#         f1.write(my_list + "\n")
#     f1.close()
# ??
# my_list = lien.strip()
with open("bill.text", 'r', encoding="utf-8") as f:
    f1 = open("bill.text.bak", 'w', encoding='utf-8')
    for lien in f:
        my_list = lien.split(",")
        # my_list[4]=my_list[4][:2:1]
        # my_list[4]=my_list[4].strip()
        my_list[4]=my_list[4].replace("\n","")
        if my_list[4] == "测试":
            continue
        my_list = str(my_list)
        my_list=my_list.strip("[]")
        my_list=my_list.replace("'",'')
        f1.write(my_list + "\n")
    f1.close()